<?php

namespace app\validate\api\housing;

use think\Validate;

class enterpriseValidate extends Validate
{

    protected $regex = ['phone' => '/^1[3456789]\d{9}|([0-9]{3,4}-)?[0-9]{7,8}$/'];

    protected $rule = [
        'Identity_type' => 'require',
        'name'   => 'require',
        'phone' => 'require',
        'Identity_id' => 'require',
        'identity_positive' => 'require',
        'identity_reverse' => 'require',
        'enterprises_phone' => 'require',
        'enterprises_address' => 'require',
        'enterprises_license' => 'require',
    ];


    protected $message = [
        'Identity_type.require' => '身份类型必填',
        'name.require'   => '姓名必填',
        'phone' => '必须是手机号',
        'phone.regex' => '手机号格式错误',
        'Identity_id' => '身份证号不正确',
        'identity_positive.require' => '身份证正面必填',
        'identity_reverse.require' => '身份证反面必填',
        'enterprises_phone' => '必须是手机号',
        'enterprises_address' => '企业地址必填',
        'enterprises_license' => '企业执照必填',


    ];

}